package com.scwatch.core.domain;

import com.scwatch.core.support.Siteable;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.domain.Page;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
  　　* @author mafei
  　　* @date 2018/10/15 15:03 
  　　*/
@Entity
@Table(name = "cms_gaoceng")
public class GaoCeng implements java.io.Serializable{
    private static final long serialVersionUID = 1L;


    private Integer id;
    private String userName;
    private String position;
    private Integer status;
    private Info info;
    private String personRelateNews;
    private Date createTime;
    private String images;
    private Special special;
    private List<Info> newsList;
    private Page<Info> pageNewsList;
    private String moreNewsUrl;
    private Integer priority;



    @Id
    @Column(name = "id", unique = true, nullable = false)
    @TableGenerator(name = "tg_cms_gaoceng", pkColumnValue = "cms_gaoceng", initialValue = 1, allocationSize = 10)
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "tg_cms_gaoceng")
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

      @Column(name = "user_name", nullable = false, length = 250)
      public String getUserName() {
          return userName;
      }

      public void setUserName(String userName) {
          this.userName = userName;
      }
      @Column(name = "position", nullable = false, length = 250)
      public String getPosition() {
          return position;
      }

      public void setPosition(String position) {
          this.position = position;
      }
      @Column(name = "f_status", nullable = false, length = 1)
      public Integer getStatus() {
          return status;
      }

      public void setStatus(Integer status) {
          this.status = status;
      }
      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumn(name = "f_info_id", nullable = false)
      public Info getInfo() {
          return info;
      }

      public void setInfo(Info info) {
          this.info = info;
      }

      @Column(name = "create_time", nullable = false)
      public Date getCreateTime() {
          return createTime;
      }

      public void setCreateTime(Date createTime) {
          this.createTime = createTime;
      }
      @Column(name = "image", nullable = false, length = 250)
      public String getImages() {
          return images;
      }

      public void setImages(String images) {
          this.images = images;
      }

      @Column(name = "relate_info_id", nullable = false, length = 1000)
      public String getPersonRelateNews() {
          return personRelateNews;
      }

      public void setPersonRelateNews(String personRelateNews) {
          this.personRelateNews = personRelateNews;
      }
      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumn(name = "f_special_id", nullable = false)
      public Special getSpecial() {
          return special;
      }

      public void setSpecial(Special special) {
          this.special = special;
      }
    @Transient
    public List<Info> getNewsList() {
        return newsList;
    }

    public void setNewsList(List<Info> newsList) {
        this.newsList = newsList;
    }
    @Transient
    public Page<Info> getPageNewsList() {
        return pageNewsList;
    }

    public void setPageNewsList(Page<Info> pageNewsList) {
        this.pageNewsList = pageNewsList;
    }
    @Transient
    public String getMoreNewsUrl() {
        return moreNewsUrl;
    }

    public void setMoreNewsUrl(String moreNewsUrl) {
        this.moreNewsUrl = moreNewsUrl;
    }
    @Column(name = "f_priority", nullable = false)
    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }
}
